# coding:utf-8

import tornado.web
import tornado.ioloop
import tornado.httpserver


class IndexHandler(tornado.web.RequestHandler):
    """"""
    def get(self):
        self.write("hello multi")

if __name__ == "__main__":
    app = tornado.web.Application(
        [(r"/", IndexHandler)]
    )
    # app.listen(8000)
    http_server = tornado.httpserver.HTTPServer(app)
    # http_server.listen(8000)
    # 绑定端口
    http_server.bind(8000)
    # 开启多进程
    http_server.start(3)
    """
    process_num
    <=0
    >0
    """
    tornado.ioloop.IOLoop.current().start()